<script setup lang="ts">
import { computed } from 'vue'
const imgPath = computed(() => {
  const root = import.meta.env.DEV ? '/' : './'
  return `${root}images/apply/hexagon/`
})
</script>

<template>
  <main class="main-wrap" v-hl>
    <div class="dev-wrap">
      <div class="hex hex-1 hex-gap">
        <div class="inner">
          <h4>HOME</h4>
          <hr />
          <p>Home Sweet Home</p>
        </div>
        <div class="corner-1"></div>
        <div class="corner-2"></div>
      </div>
      <div class="hex hex-2">
        <div class="inner">
          <h4>ABOUT US</h4>
          <hr />
          <p>We Are The Experts</p>
        </div>
        <div class="corner-1"></div>
        <div class="corner-2"></div>
      </div>
      <div class="hex hex-3">
        <div class="inner">
          <h4>CONTACT US</h4>
          <hr />
          <p>We Open Everyday</p>
        </div>
        <div class="corner-1"></div>
        <div class="corner-2"></div>
      </div>
      <div class="hex" :style="`background-image: url(${imgPath}2.jpg)`">
        <div class="corner-1"></div>
        <div class="corner-2"></div>
      </div>
      <div class="hex" :style="`background-image: url(${imgPath}3.jpg)`">
        <div class="corner-1"></div>
        <div class="corner-2"></div>
      </div>
      <div class="hex" :style="`background-image: url(${imgPath}4.jpg)`">
        <a href="http://www.internetke.com" target="_blank"></a>
        <div class="corner-1"></div>
        <div class="corner-2"></div>
      </div>
      <div class="hex" :style="`background-image: url(${imgPath}5.jpg)`">
        <div class="corner-1"></div>
        <div class="corner-2"></div>
      </div>
      <div class="hex hex-gap" :style="`background-image: url(${imgPath}6.jpg)`">
        <a href="http://www.internetke.com" target="_blank"></a>
        <div class="corner-1"></div>
        <div class="corner-2"></div>
      </div>
      <div class="hex" :style="`background-image: url(${imgPath}7.jpg)`">
        <div class="corner-1"></div>
        <div class="corner-2"></div>
      </div>
      <div class="hex" :style="`background-image: url(${imgPath}8.jpg)`">
        <div class="corner-1"></div>
        <div class="corner-2"></div>
      </div>
      <div class="hex" :style="`background-image: url(${imgPath}9.jpg)`">
        <div class="corner-1"></div>
        <div class="corner-2"></div>
      </div>
      <div class="hex" :style="`background-image: url(${imgPath}10.jpg)`">
        <div class="corner-1"></div>
        <div class="corner-2"></div>
      </div>
      <div class="hex" :style="`background-image: url(${imgPath}11.jpg)`">
        <div class="corner-1"></div>
        <div class="corner-2"></div>
      </div>
      <div class="hex" :style="`background-image: url(${imgPath}12.jpg)`">
        <div class="corner-1"></div>
        <div class="corner-2"></div>
      </div>
      <div class="hex hex-gap" :style="`background-image: url(${imgPath}13.jpg)`">
        <div class="corner-1"></div>
        <div class="corner-2"></div>
      </div>
      <div class="hex" :style="`background-image: url(${imgPath}14.jpg)`">
        <div class="corner-1"></div>
        <div class="corner-2"></div>
      </div>
    </div>
  </main>
</template>

<style scoped lang="scss">
.main-wrap {
  @include size(100%, 100%);
  padding: 24px;
  overflow-y: auto;
  background: #f1f9f9;
  .dev-wrap {
    @include size(700px, auto);
    padding: 24px 0;
    margin: 0 auto;
    overflow: hidden;
    .hex {
      width: 150px;
      height: 86px;
      @include size(150px, 86px);
      background-color: #ccc;
      background-repeat: no-repeat;
      background-position: 50% 50%;
      background-size: auto 173px;
      position: relative;
      float: left;
      margin: 25px 5px;
      text-align: center;
      zoom: 1;
      .corner-1,
      .corner-2 {
        @include size(100%, 100%);
        position: absolute;
        top: 0;
        left: 0;
        z-index: 0;
        overflow: hidden;
        background: inherit;
        backface-visibility: hidden;
        &::before {
          width: 173px;
          height: 173px;
          content: '';
          position: absolute;
          top: 0;
          left: 0;
          z-index: 1;
          background: inherit;
          background-repeat: no-repeat;
          backface-visibility: hidden;
        }
      }
      .corner-1 {
        z-index: 1;
        transform: rotate(60deg);
        &::before {
          transform: rotate(-60deg) translate(-87px, 0px);
          transform-origin: 0 0;
        }
      }
      .corner-2 {
        z-index: 2;
        transform: rotate(-60deg);
        &::before {
          transform: rotate(60deg) translate(-48px, -11px);
          bottom: 0;
        }
      }
      .inner {
        position: relative;
        color: #eee;
        text-align: center;
        font: bold 16px Arial;
        z-index: 3;
      }
      h4 {
        margin: 0;
        font:
          bold 16px 'Josefin Sans',
          sans-serif;
      }
      hr {
        border: 0;
        border-top: 1px solid #eee;
        width: 60%;
        margin: 15px auto;
      }
      p {
        font-size: 16px;
        font-family: 'Kotta One', serif;
        width: 80%;
        margin: 0 auto;
      }
      &.hex-gap {
        margin-left: 86px;
      }
      &.hex-1 {
        background: #74cddb;
      }
      &.hex-2 {
        background: #f5c53c;
      }
      &.hex-3 {
        background: #80b971;
      }
    }
  }
}
</style>
